<template>
    <div class="login-yzm">
        <slide-verify :l="42" :r="10" :w="410" :h="255" @success="onSuccess" @fail="onFail"  @refresh="onRefresh" :slider-text="text"></slide-verify>
    </div>
</template>

<script>
    export default {
        name: "LoginYzm",
        data(){
            return {
                text: '滑动验证',
            }
        },
        methods: {
            onSuccess(){
                this.$emit('yzmClose', true)
            },
            onFail(){
                this.$message.error("验证失败")
                this.$emit('yzmClose', false)
            },
            onRefresh(){
                this.msg = ''
            }
        }
    }
</script>

<style scoped>
    .login-yzm{
        z-index: 99;
        position: absolute;
        transform: translate(-50%,-50%);
        top: 50%;
        left: 50%;
    }
</style>